package com.xiaoshuidi.cloud.module.member.controller.app.activities;


import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.framework.common.pojo.PageParam;
import com.xiaoshuidi.cloud.framework.common.pojo.PageResult;
import com.xiaoshuidi.cloud.module.member.controller.app.activities.vo.ActivitiesListVO;
import com.xiaoshuidi.cloud.module.member.service.activities.MemberActivitiesService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xiaoshuidi.cloud.module.member.enums.ApiConstants;

import javax.annotation.Resource;


import static com.xiaoshuidi.cloud.framework.common.pojo.CommonResult.success;

@Tag(name = "租客APP - 活动")
@RestController
@RequestMapping(ApiConstants.NAME+"/activities")
@Validated
public class AppMemberActivityController {
    @Resource
    private MemberActivitiesService memberActivitiesService;


    @PostMapping("/get-list")
    @Operation(summary = "活动列表")
    public CommonResult<PageResult<ActivitiesListVO>> getList(@RequestBody PageParam pageParam) {
        return success(memberActivitiesService.getList(pageParam));
    }

}
